<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('index')}">虚拟地址列表</a></li>
			<if condition="auth_check('add')">
				<li><a href="{:url('add')}">添加</a></li>
			</if>
		</ul>
		<form class="well form-inline margin-top-20" method="get" action="{:url('index')}">
			关键字:
			<input type="text" class="form-control" name="keyword" style="width: 200px;"
				   value="{$where_r.keyword|default=''}" placeholder="请输入关键字..."> &nbsp;&nbsp;
			成交类型:
			<select class="form-control" name="cus_type" style="width: 140px;">
				<option value='0'>全部</option>
				<option value='2' <eq name="where_r.cus_type|default=0" value="2">selected</eq> >中介</option>
				<option value='3' <eq name="where_r.cus_type|default=0" value="3">selected</eq> >直接客户</option>
				<option value='1' <eq name="where_r.cus_type|default=0" value="1">selected</eq> >无</option>
			</select> &nbsp;&nbsp;
			<input type="submit" class="btn btn-primary" value="搜索"/>
			<a class="btn btn-danger" href="{:url('index')}">清空</a>
		</form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>房间号</th>
					<th>详细地址</th>
					<th>去向</th>
					<th>客户类型</th>
					<th>公司名称</th>
					<th>到期时间</th>
					<th>创建时间</th>
					<th>录入人</th>
					<th width="160">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="lists" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.home_no}</td>
					<td>{$vo.address_name}</td>
					<td>{$vo.from_to}</td>
					<td>
						<switch name="vo.cus_type">
							<case value="0">无</case>
							<case value="1">中介</case>
							<case value="2">直接客户</case>
						</switch>
					</td>
					<td>{$vo.company}</td>
					<td>{$vo.end_time|date="Y-m-d",###}</td>
					<td>{$vo.create_time|date="Y-m-d",###}</td>
					<td>{$vo.user_nickname}</td>
					<td>
						<if condition="auth_check('edit')">
							<a href='{:url("edit",array("id"=>$vo["id"]))}'>编辑</a>
						</if>
						<if condition="auth_check('renew')"> | <a href='javascript:parent.openIframeLayer("{:url("renew",["vid" => $vo["id"]])}","续费列表")'>续费列表</a></if>
						<if condition="auth_check('follow')"> | <a href='javascript:parent.openIframeLayer("{:url("follow",["pid" => $vo["id"]])}","跟进记录")'>跟进</a></if>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}<li><a>共计 {$lists->total()} 条</a></li></div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>